function Get-ScriptDir
{
	$CallingInvocation = Get-Variable -scope 0 myinvocation
	$ScriptName = $CallingInvocation.Value.ScriptName
	if ($ScriptName -ne $null -and $ScriptName -ne "")
	{
	  $scriptPath = Split-Path -Parent $CallingInvocation.Value.ScriptName
	}
	else
	{
		$scriptPath =[string] (get-location)
	}
	$scriptPath
}

if (-not $PsSyncInitialized)
{
	$Global:PsSyncDir = Get-ScriptDir

	$Env:Path += ";$PsSyncDir"
	
	$PsSyncInitialized = $true
}